package cn.baimo.mapper;

import cn.baimo.pojo.Doctor;
import cn.baimo.pojo.Hospital;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DoctorMapper {
    //添加医生
//    @Insert("insert into doctor values(default,#{name},#{sex},#{image},#{education},#{skilled},#{intro},#{level},#{})")
//    int insertDoctor(Doctor doctor);
    //查询热门医生
    List<Doctor> selectHotDoctor();
    //查询医生总数
    @Select("select count(1) from doctor")
    int selectDoctorTotalNum();
    //通过条件查询医生
    List<Doctor> selectDoctorsByDoctor(@Param("doctor") Doctor doctor, @Param("diName") String diName, @Param("hospital")Hospital hospital);
}
